<?php
/**
 * 网站管理
 * 
 * @author  Lee<a605333742@gmail.com>
 * @time    2016-08-30
 */
namespace Admin\Controller;

class WebController extends CommonController{
    /*
     * 构造函数
     * 
     * @return #
     */
    public function _initialize() {
        parent::_initialize();
        $this->db   =D("Web");
    }
    
    /*
     * 网站消息
     * 
     * @return #
     */
    public function webIndex(){
        $webInfo    =$this->db->where(array("status"=>1))->find();
        $this->assign("webInfo",$webInfo);
        $this->display();
    }
    
    /*
     * 编辑前置操作
     * 
     * @return #
     */
    public function _before_edit(){
        session('web_icon',$this->db->where(array("id"=>I("request.id")))->getField("icon"));        
    }
}